3.34 \(\int \frac{(1+\sin (x^2))^2}{x^3} \, dx\)

Optimal. Leaf size=44 \[ \text{CosIntegral}\left (x^2\right )+\frac{\text{Si}\left (2 x^2\right )}{2}-\frac{3}{4 x^2}-\frac{\sin \left (x^2\right )}{x^2}+\frac{\cos \left (2 x^2\right )}{4 x^2} \]

[Out]

-3/(4*x^2) + Cos[2*x^2]/(4*x^2) + CosIntegral[x^2] - Sin[x^2]/x^2 + SinIntegral[2*x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.100006, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3403, 3380, 3297, 3299, 3379, 3302} \[ \text{CosIntegral}\left (x^2\right )+\frac{\text{Si}\left (2 x^2\right )}{2}-\frac{3}{4 x^2}-\frac{\sin \left (x^2\right )}{x^2}+\frac{\cos \left (2 x^2\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[(1 + Sin[x^2])^2/x^3,x]

[Out]

-3/(4*x^2) + Cos[2*x^2]/(4*x^2) + CosIntegral[x^2] - Sin[x^2]/x^2 + SinIntegral[2*x^2]/2

Rule 3403

Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rule 3380

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3379

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\left (1+\sin \left (x^2\right )\right )^2}{x^3} \, dx &=\int \left (\frac{3}{2 x^3}-\frac{\cos \left (2 x^2\right )}{2 x^3}+\frac{2 \sin \left (x^2\right )}{x^3}\right ) \, dx\\ &=-\frac{3}{4 x^2}-\frac{1}{2} \int \frac{\cos \left (2 x^2\right )}{x^3} \, dx+2 \int \frac{\sin \left (x^2\right )}{x^3} \, dx\\ &=-\frac{3}{4 x^2}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{\cos (2 x)}{x^2} \, dx,x,x^2\right )+\operatorname{Subst}\left (\int \frac{\sin (x)}{x^2} \, dx,x,x^2\right )\\ &=-\frac{3}{4 x^2}+\frac{\cos \left (2 x^2\right )}{4 x^2}-\frac{\sin \left (x^2\right )}{x^2}+\frac{1}{2} \operatorname{Subst}\left (\int \frac{\sin (2 x)}{x} \, dx,x,x^2\right )+\operatorname{Subst}\left (\int \frac{\cos (x)}{x} \, dx,x,x^2\right )\\ &=-\frac{3}{4 x^2}+\frac{\cos \left (2 x^2\right )}{4 x^2}+\text{Ci}\left (x^2\right )-\frac{\sin \left (x^2\right )}{x^2}+\frac{\text{Si}\left (2 x^2\right )}{2}\\ \end{align*}

Mathematica [A]  time = 0.101377, size = 41, normalized size = 0.93 \[ \frac{4 x^2 \text{CosIntegral}\left (x^2\right )+2 x^2 \text{Si}\left (2 x^2\right )-4 \sin \left (x^2\right )+\cos \left (2 x^2\right )-3}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Sin[x^2])^2/x^3,x]

[Out]

(-3 + Cos[2*x^2] + 4*x^2*CosIntegral[x^2] - 4*Sin[x^2] + 2*x^2*SinIntegral[2*x^2])/(4*x^2)

________________________________________________________________________________________

Maple [A]  time = 0.019, size = 39, normalized size = 0.9 \begin{align*} -{\frac{3}{4\,{x}^{2}}}+{\it Ci} \left ({x}^{2} \right ) +{\frac{\cos \left ( 2\,{x}^{2} \right ) }{4\,{x}^{2}}}+{\frac{{\it Si} \left ( 2\,{x}^{2} \right ) }{2}}-{\frac{\sin \left ({x}^{2} \right ) }{{x}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+sin(x^2))^2/x^3,x)

[Out]

-3/4/x^2+Ci(x^2)+1/4*cos(2*x^2)/x^2+1/2*Si(2*x^2)-sin(x^2)/x^2

________________________________________________________________________________________

Maxima [C]  time = 1.11866, size = 73, normalized size = 1.66 \begin{align*} \frac{x^{2}{\left (i \, \Gamma \left (-1, 2 i \, x^{2}\right ) - i \, \Gamma \left (-1, -2 i \, x^{2}\right )\right )} - 1}{4 \, x^{2}} - \frac{1}{2 \, x^{2}} + \frac{1}{2} \, \Gamma \left (-1, i \, x^{2}\right ) + \frac{1}{2} \, \Gamma \left (-1, -i \, x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="maxima")

[Out]

1/4*(x^2*(I*gamma(-1, 2*I*x^2) - I*gamma(-1, -2*I*x^2)) - 1)/x^2 - 1/2/x^2 + 1/2*gamma(-1, I*x^2) + 1/2*gamma(
-1, -I*x^2)

________________________________________________________________________________________

Fricas [A]  time = 2.3233, size = 154, normalized size = 3.5 \begin{align*} \frac{x^{2} \operatorname{Ci}\left (-x^{2}\right ) + x^{2} \operatorname{Ci}\left (x^{2}\right ) + x^{2} \operatorname{Si}\left (2 \, x^{2}\right ) + \cos \left (x^{2}\right )^{2} - 2 \, \sin \left (x^{2}\right ) - 2}{2 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="fricas")

[Out]

1/2*(x^2*cos_integral(-x^2) + x^2*cos_integral(x^2) + x^2*sin_integral(2*x^2) + cos(x^2)^2 - 2*sin(x^2) - 2)/x
^2

________________________________________________________________________________________

Sympy [A]  time = 5.82142, size = 51, normalized size = 1.16 \begin{align*} - \log{\left (x^{2} \right )} + \frac{\log{\left (x^{4} \right )}}{2} + \operatorname{Ci}{\left (x^{2} \right )} + \frac{\operatorname{Si}{\left (2 x^{2} \right )}}{2} - \frac{\sin{\left (x^{2} \right )}}{x^{2}} + \frac{\cos{\left (2 x^{2} \right )}}{4 x^{2}} - \frac{3}{4 x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x**2))**2/x**3,x)

[Out]

-log(x**2) + log(x**4)/2 + Ci(x**2) + Si(2*x**2)/2 - sin(x**2)/x**2 + cos(2*x**2)/(4*x**2) - 3/(4*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.09745, size = 53, normalized size = 1.2 \begin{align*} \frac{4 \, x^{2} \operatorname{Ci}\left (x^{2}\right ) + 2 \, x^{2} \operatorname{Si}\left (2 \, x^{2}\right ) + \cos \left (2 \, x^{2}\right ) - 4 \, \sin \left (x^{2}\right ) - 3}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+sin(x^2))^2/x^3,x, algorithm="giac")

[Out]

1/4*(4*x^2*cos_integral(x^2) + 2*x^2*sin_integral(2*x^2) + cos(2*x^2) - 4*sin(x^2) - 3)/x^2